Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

updates for compiling to Xcode 7.3 #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

johndpope
Copy link

No description provided.

var data1:NSData = NSData(contentsOfFile: path1!)!
let json1:AnyObject = NSJSONSerialization.JSONObjectWithData(data1, options: NSJSONReadingOptions.AllowFragments, error:&error)!
let data1:NSData = NSData(contentsOfFile: path1!)!
let json1:AnyObject = try! NSJSONSerialization.JSONObjectWithData(data1, options: NSJSONReadingOptions.AllowFragments)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should perform a do-try-catch block here, don't force try

@ecompton3
Copy link

There's some force unwrapping that I'm not the biggest fan of but over all this code does run on on 7.3 but needs some more work after the fact (lot of deprecation or Swift 3 deprecation warnings). I'm okay with accepting this as this is a good first step but another pull request/issue should be opened up to deal with these new warnings going forward.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants